// 表单配置
export const fieldList = ref([
  {
    field: "activity_status",
    type: "select",
    // originField: "Base.BaseAsinList.IsNewEnum",
    originField: "Base.BaseAsinList.ActivityStatusEnum",
    options: {
      placeholder: "活跃度",
    },
    style: { width: "120px" },
  },
  {
    field: "site_id",
    type: "select",
    originField: "amazonSite",
    multiple: true,
    collapseTags: true,
    options: { placeholder: "国家" },
    style: { width: "200px" },
  },
  {
    field: "skuRange",
    placeholder: "可批量搜索",
    type: "textarea",
    select: [
      { label: "SKU", value: "sku" },
      { label: "自定SKU", value: "custom_sku" },
      { label: "ASIN", value: "asin" },
    ],
    style: { width: "200px" },
  },
  // {
  //   field: "userRange",
  //   type: "cascader",
  //   multiple: true,
  //   collapseTags: true,
  // selectStyle: { width: "120px" },
  // select: [
  //   { label: "运营人员", value: "operator_user" },
  //   { label: "计划人员", value: "planner_user" },
  //   { label: "添加人员", value: "created_by" },
  // ],
  // style: { width: "200px" },
  // },
  {
    field: "userRange",
    type: "cascaderNew",

    selectStyle: { width: "120px" },
    select: [
      { label: "运营人员", value: "operator_user" },
      { label: "计划人员", value: "planner_user" },
      { label: "添加人员", value: "created_by" },
    ],
    style: { width: "200px" },
  },

  {
    field: "status",
    type: "select",
    originField: "Base.BaseAsinList.StatusEnum",
    options: { placeholder: "状态" },
    style: { width: "120px" },
  },
  {
    field: "is_requires_stocking",
    type: "select",
    originField: "Base.BaseAsinList.IsRequiresStockingEnum",
    options: { placeholder: "是否需要备料" },
    style: { width: "200px" },
  },
])

// 表格 列配置
export const tableColumns = ref([
  { field: "activity_status_text", title: "活跃状态", width: 80 },
  { field: "site_code", title: "国家", width: 100 },
  { field: "store_name", title: "ASIN店铺", width: 160 },
  { field: "asin", title: "ASIN", width: 120 },
  {
    field: "status_text",
    title: "SKU/自定义SKU",
    width: 150,
    slots: {
      default: ({ row }) => (
        <div>
          <VText value={row.sku} line={1} />
          <VText value={row.custom_sku} line={1} />
        </div>
      ),
    },
  },
  { field: "main_store_name", title: "主店铺", width: 150 },
  {
    field: "sub_store_name",
    title: "关联副店铺",
    width: 180,
    slots: {
      default: "SubStoreName",
      // default: ({ row }) => (
      //   <div>
      //     {row.base_asin_store.map((v, i) => (i < 2 || row.storeShow ? <VText value={v.sub_store_name} line={1} /> : ""))}
      //     {row.base_asin_store.length > 2 ? (
      //       <el-link type="primary" underline={false} onClick={() => (row.storeShow = !row.storeShow)}>
      //         查看更多
      //       </el-link>
      //     ) : (
      //       ""
      //     )}
      //   </div>
      // ),
    },
  },
  {
    field: "product_category_text",
    title: "商品类目",
    width: 140,
    slots: {
      default: ({ row }) => <VText value={row.product_category_text} line={2} />,
    },
  },
  {
    field: "sku_title",
    title: "商品名称",
    width: 260,
    slots: {
      default: ({ row }) => <VText value={row.sku_title} line={2} />,
    },
  },
  {
    title: "状态",
    field: "status_text",
    width: 100,
    slots: {
      default: ({ row }) => <VStatus value={row.status_text == "启用"} />,
    },
  },
  { field: "is_requires_stocking_text", title: "需要备料", width: 80 },
  { title: "备料后\n采购天数", field: "stocking_lead_time", width: 80 },
  { field: "operator_user_text", title: "操作运营", width: 120 },
  { field: "second_operator_name", title: "销售人员", width: 120 },
  { field: "department_name", title: "部门", width: 200 },
  { field: "planner_user_text", title: "计划人员", width: 120 },
  { field: "purchaser_user_text", title: "采购人员", width: 120 },
  { field: "transportation_type_text", title: "运输类型", width: 100 },
  { field: "transportation_timeframe", title: "运输时效", width: 100 },
  { field: "created_at", title: "添加时间", width: 180 },
  { field: "created_by_text", title: "添加人", width: 120 },
])
